﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace guangbo
{
    //1创建委托
    public delegate void wei(string b);


    public partial class FrmMine : Form
    {
        public FrmMine()
        {
            InitializeComponent();
        }

        //3创建变量
        public wei ce = null;

        private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 1; i < 4; i++)
            { 
            
            FrmNew frm = new FrmNew(i);
            frm.Show();
                //4关联变量,不是等于了，是传递
                this.ce += frm.Rece;
            }

          

        }

        private void button2_Click(object sender, EventArgs e)
        {

            ce(this.textBox1.Text.Trim());




        }
    }
}
